<?xml version="1.0" encoding="windows-1252"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <ui:composition template = "/WEB-INF/faces/template.xhtml">
        <ui:define name ="title">
            <h:outputText title="New Driver"/>
        </ui:define>
        <ui:define name="content">
            <h:panelGroup id="messagePanel" layout="block">
                <p:growl sticky="true"/>
            </h:panelGroup>
            <p:panel header="Add Driver" style="border: none;">
                <h:form>
                    <h:panelGrid id ="entryPanel" columns="3">
                        <h:outputLabel value="Driver Name" for="driverName" />
                        <h:inputText id="driverName" value="#{driverBean.selected.driverName}" requiredMessage ="required" required ="true" />
                        <p:message for="driverName" />
                        <h:outputLabel value="Contact Number" for="contactNumber" />
                        <h:inputText id="contactNumber" value="#{driverBean.selected.contactNumber}" requiredMessage ="required" required ="true"/>
                        <p:message for="contactNumber" />
                        <h:outputLabel value="Licence Number" for="licenceNumber" />
                        <h:inputText id="licenceNumber" value="#{driverBean.selected.licenceNumber}" requiredMessage="required" required ="true"/>
                        <p:message for="licenceNumber" />
                        <h:outputLabel value="Enrolled Date" for="enrolledDate" />
                        <h:inputText id="enrolledDate" value="#{driverBean.selected.enrolledDate}" required="false" />
                        <p:message for="enrolledDate" />
                        <h:outputLabel value="Address" for="address" />
                        <h:inputText id="address" value="#{driverBean.selected.address}" required ="false" />
                        <p:message for="address" />

                    </h:panelGrid>
                    <br/>
                    <p:commandButton action="#{driverBean.update}" value="Save" update="entryPanel"/>

                    <p:commandButton action="pretty:listDrivers" value="Cancel" immediate="true"/>

                </h:form>
            </p:panel>
        </ui:define>
    </ui:composition>
</html>
